#define  _CRT_SECURE_NO_WARNINGS
class Solution {
public:
    int maxVowels(string s, int k) {
        int ret = 0;
        int i = 0;
        unordered_set<char> hash;
        hash.insert('a');
        hash.insert('e');
        hash.insert('i');
        hash.insert('o');
        hash.insert('u');
        for (; i < k; i++)
            if (hash.count(s[i]))
                ret++;
        int cur = ret;
        int n = s.size();
        for (; i < n; i++)
        {
            if (hash.count(s[i - k]))
                cur--;
            if (hash.count(s[i]))
                cur++;
            ret = max(ret, cur);
        }
        return ret;
    }
};